const mongoose = require('mongoose');

// 定义行程的Schema
const courseSchema = new mongoose.Schema({
  name: {
    type: String,
    required: true, // 行程名称必填
  },
  time: {
    type: String,
    required: true, // 行程时间必填
  },
  day: {
    type: Number,
    required: true, // 行程星期几，0 = 星期日, 1 = 星期一, ... 6 = 星期六
  },
});

// 创建模型
const Course = mongoose.model('Course', courseSchema);

// 导出模型
module.exports = Course;
